<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<title>權限管理平台登入頁</title>
		<link rel="stylesheet" href="/sinopac/form/CSS/tabs.css">
		<script type="text/javascript" src="http://code.jquery.com/jquery-1.8.2.min.js"></script>  
		<script>
			function clean(){
				$('#userName_a').val("");
				$('#passWord_a').val("");
			}
			
			function buttonOK(){
				if($('#userName_a').val()==""){
					alert("帳號請勿空白");
				}else if($('#passWord_a').val()==""){
					alert("密碼請勿空白");
				}else{
					$('#form1').submit();
				}
			}
			$(document).ready(function() {
				if(<s:property value="loginFlag"/>){
					alert("帳號密碼輸入有誤");
				}
			});
		</script> 
	</head>
	<body>
		<div align="center">
			<table width="768" align="center">
				<tr align="left">
					<td><img src="../form/images/BankSinoPacLogo.png"/></td>
					<td align="left">權限管理平台</td>
				</tr>
			</table>
		</div>
		<div align="center">
			<fieldset style="border-color: #8B7B8B;width: 300px">
				<s:form action="index" id="form1">	
					<table align="center">
						<tr>
							<td><s:textfield name="userName" label="請輸入帳號" id="userName_a"/></td>
						</tr>
						<tr>
							<td><s:password name="passWord" label="請輸入密碼" id="passWord_a"/></td>
						</tr>
						<tr>
							<td align="center"><button onclick="buttonOK()">確定</button></td>
							<td align="center"><button onclick="clean()">取消</button></td>
						</tr>
					</table>
				</s:form>	
			</fieldset>
		</div>
	</body>
</html>